import request from '../utils/request'
import exportrequest from '../utils/exportrequest'

export function findUserList(current,size,userVO) {
  return request({
    url: '/user/findUserList',
    method: 'post',
    params:{
      current,
      size
    },
    data: userVO
  })
}


export function deleteImgFile(oldimage) {
  return request({
    url: '/oss/deleteFile',
    method: 'post',
    params:{
      fileName:oldimage
    }
  })
}

/**
 * 导出用户Excel 一定要加responseType(响应的类型)
 * @param userVo
 */
 export function exportUserInfo(userVO) {
  return exportrequest({
    url: '/user/export',
    method: 'post',
    data: userVO,
    responseType: "blob"
  })
}


export function login(username,password) {
  return request({
    url: '/user/login',
    method: 'post',
    params:{
      username,
      password
    }
  })
}

